#include "./include/cpu.h"
#include "./include/basictype.h"

extern UINT32 CP15_ReadDeviceID(void);

void cpu_getProcessorInfo(ProcessorInfo *pInfo){
    UINT32 val=CP15_ReadDeviceID();
    if(pInfo){
        pInfo->implementer = ((val>>24) & 0xff);
        pInfo->specifyRevison = ((val>>20) & 0xf);
        pInfo->architecture = ((val>>16) & 0xf);
        pInfo->partNumber = ((val>>4) & 0xfff);
        pInfo->layoutRevision = (val & 0xf);
    }
}
